<script setup lang="ts">
import img1 from '@/assets/lunbo1.png';
import img2 from '@/assets/lunbo2.png';
import img3 from '@/assets/lunbo3.png';
import img4 from '@/assets/lunbo4.png';
const carouselData = [
  { url: img1 },
  { url: img2 },
  { url: img3 },
  { url: img4 },
]
</script>
<template>
<div>
    <el-carousel :interval="4000" type="card" height="300px">
        <el-carousel-item v-for="item in carouselData" :key="item.url">
            <img :src="item.url" alt="轮播图片" style="width: 100%; height: 80%;"/>
            <!-- <h3>{{ item.url }}</h3> -->
            <p style="color: red; height: 20%;">dhajdahdajkshd</p>
      </el-carousel-item>
  </el-carousel>
</div>
</template>

<style>
.{
  display: block;
  box-sizing: 0;
}
.el-carousel__item p {
  /* opacity: 0.75; */
  line-height: 250px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}

</style>